<section class="scrollable padder-md" data-ng-controller="AdminRoleEditController">
    <div class="m-b-md">
        <a href="" class="btn btn-rounded  btn-sm btn-icon btn-default pull-right" data-ng-click="close()">
            <i class="fa fa-reply"></i>
        </a>
        <h3 class="m-b-none text-black">
            <i class="fa fa-edit m-r-sm"></i>
            后台基础配置 - 角色 - {{role.name || '新增'}}
        </h3>
    </div>

    <section class="panel panel-default">
        <div class="panel-body">
            <form class="form-horizontal">
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        角色名称：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="role.name" required/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        角色描述：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="role.description" required/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        是否具备全部权限：
                    </label>

                    <div class="col-md-8">
                        <div class="radio-inline i-checks">
                            <label>
                                <input type="radio" value="1" data-ng-model="role.isSuper">
                                <i></i>
                                是
                            </label>
                        </div>
                        <div class="radio-inline i-checks">
                            <label>
                                <input type="radio" value="0" data-ng-model="role.isSuper">
                                <i></i>
                                否
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        状态：
                    </label>

                    <div class="col-md-8">
                        <div class="radio-inline i-checks">
                            <label>
                                <input type="radio" value="1" data-ng-model="role.state">
                                <i></i>
                                启用
                            </label>
                        </div>
                        <div class="radio-inline i-checks">
                            <label>
                                <input type="radio" value="0" data-ng-model="role.state">
                                <i></i>
                                禁用
                            </label>
                        </div>
                    </div>
                </div>

                <!--树形图 选择权限-->
                <div class="form-group" ng-if="role.isSuper!=1">
                    <label class="col-md-3 control-label">
                        选择权限：
                    </label>

                    <div class="col-md-8">
                        <div treecontrol class="tree-classic"
                             data-tree-model="dataForTheTree"
                             data-options="treeOptions"
                             data-on-selection="showSelected(node)"
                             data-selected-node="node1">
                            <div class="checkbox i-checks" style="position: absolute;top: -8px;left: 1px;padding-top: 0;margin-top: 7px">
                                <label>
                                    <input type="checkbox" value="" ng-checked="node.checked" ng-model="node.checked" ng-click="checkedNode(node)">
                                    <i></i>
                                </label>
                            </div>
                            {{node.name}}
                        </div>
                    </div>
                </div>
                <!-- 按钮 -->
                <div class="form-group text-right" style="margin-left: 15px; margin-right: 15px;">
                    <button type="button" class="btn btn-default" data-ng-click="close()">
                        <i class="i i-arrow"></i>
                        &nbsp;返回
                    </button>
                    <button type="submit" class="btn btn-success" data-ng-click="saveObj()">
                        <i class="fa fa-save"></i>
                        &nbsp;保存
                    </button>
                </div>
            </form>
        </div>
    </section>
</section>
